<script type="text/javascript">
    $("#gg_content_code").keyup(function(){
        if ($(this).val().length > 4) {
            $(this).val($(this).val().substring(0,4));
        }
        $(this).next().val($(this).prev().html()+$(this).val());
    });
</script>
<form id="wzbmForm" action="${base}/sys/wzbm/gg" method="post">
    <input type="hidden" name="gg.id" value="${(gg.id)!''}"/>
    <table style="width:99.7%" class="tb tb-con">
        <col width="10%"/><col width="30%"/><col width="10%"/><col width="30%"/>
        <tr>
            <th style="color:#f45212;">物资名称：</th>
            <td><input name="gg.name" type="text" class="easyui-validatebox input-text" required="true" value="${(gg.name)!}"/></td>
            <th style="color:#f45212;">规格代码：</th>
            <#--<td><input name="gg.code" type="text" class="easyui-validatebox input-text" required="true" value="${(gg.code)!}"/></td>-->
            <#--<td><div class="bang"><span class="sp">${(gg.pm.code)!}</span>-->
                <#--<input id="gg_content_code" type="text" class="easyui-validatebox db" required="true" <#if (gg.code)??>value="${(gg.code)?substring(8)}"</#if> validType="fixLength[4]"/>-->
                <#--<input name="gg.code" type="hidden" value="${(gg.code)!}"/></div></td>-->
            <td>
            <#if !gg.code??><span style="width:65px">${(gg.pm.code)!}</span><input readonly="true" type="text" class="input-text" style="width:112px"/>
            <#else><input readonly="true" type="text" class="input-text" value="${(gg.code)!}"/></#if>
            </td>
        </tr>
        <tr>
            <th style="color:#f45212;">规格型号：</th>
            <td><input name="gg.ggxh" type="text" class="easyui-validatebox input-text" required="true" value="${(gg.ggxh)!}"/></td>
            <th>规格简称：</th>
            <td><input name="gg.ggjc" type="text" class="input-text" value="${(gg.ggjc)!}"/></td>
        </tr>
        <tr>
            <th style="color:#f45212;">单位：</th>
            <td><input name="gg.dw" type="text" class="input-text" value="${(gg.dw)!'吨'}"  required="true"  /></td>
            <th>材质：</th>
            <td><input name="gg.cz" type="text" class="input-text" value="${(gg.cz)!}"/></td>
        </tr>
        <th>所属品名：</th>
        <td>
            <input name="gg.pm.id" type="hidden" value="${(gg.pm.id)!}"/>
            <input name="gg.pm.name" disabled="true" class="input-text" style="color:darkgray"  type="text" value="${(gg.pm.name)!}"/>
        </td>
        <th>是否报价：</th>
        <td>
        <#--<label><input name="gg.sfbj" type="radio" value="0" style="vertical-align:middle" <#if (gg.sfbj)??><#else>checked="checked" </#if> <#if (gg.sfbj)??&& (gg.sfbj)==true>checked="checked" </#if>/>是</label>-->
        <#--<label><input name="gg.sfbj" type="radio" value="1" style="vertical-align:middle" <#if (gg.sfbj)?? && (gg.sfbj)==false>checked="checked"</#if>/>否</label>-->
            <label style="width: 90px;"><input type="checkbox" name="gg.sfbj" value="true" <#if (gg.sfbj)?? && gg.sfbj>checked</#if>></label>
        </td>
    </table>
    <div style="padding:5px 0;text-align:right;padding-right:30px">
        <a href="#" class="easyui-linkbutton" iconcls="icon-save" plain="true"
           onclick="wzbm_saveItem('${index}','${level}')">保存</a>
        <a href="#" class="easyui-linkbutton" iconcls="icon-cancel" plain="true"
           onclick="wzbm_cancelItem('${index}')">取消</a>
    </div>
</form>

